//时间格式化
import dayjs from 'dayjs'
import utc from 'dayjs/plugin/utc'
import timezone from 'dayjs/plugin/timezone'

dayjs.extend(utc)
dayjs.extend(timezone)

export const formatUTC = (utcString: string) => {
  // 先将时间字符串解析为本地时间
  const localTime = dayjs(utcString)
  // 再格式化为所需的日期格式
  const runTime = localTime.format('YYYY-MM-DD')
  return runTime
}
